package com.gzl.demo.controller;

public class Test {
    public static void main(String[] args) {
        
    }

  /*  private static int getContinuousSignInDay(List<SignIn> signInList) throws ParseException {
        //continuousDay 连续签到数
        int continuousDay = 1;
        boolean todaySignIn = false;
        // today 当天日期
        Date today = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String todays=sdf.format(today);

        for (int i = 0; i < signInList.size(); i++) {
            SignIn signIn = signInList.get(i);
            int intervalDay = distanceDay(sdf.parse(todays), signIn.getSignInDay());
            //当天签到
            if (intervalDay == 0 && i == 0) {
                todaySignIn = true;
            }else if (intervalDay == continuousDay) {
                continuousDay++;
            }else {
                //不连续，终止判断
                break;
            }
        }
        if (!todaySignIn) {
            continuousDay--;
        }
        return continuousDay;
    }


    //判断当天日期 与以往签到日期相隔天数
    private static int distanceDay(Date largeDay, Date smallDay) {
        int day = (int) ((largeDay.getTime() - smallDay.getTime()) / (1000 * 60 * 60 * 24));return day;
    }*/
}
